﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using JXT.PrimaryKey.Batman.Domain.Repositories;
using JXT.PrimaryKey.Batman.Domain.Quotation.Models;

namespace JXT.PrimaryKey.Batman.Domain.Quotation.Repositories
{
    public interface ISecuritiesRepository : IReadRepository<Securities, int>
    {
        /// <summary>
        /// 增加证劵代码
        /// </summary>
        /// <param name="entity">证劵代码信息</param>
        void Add(Securities entity);

        /// <summary>
        /// 获取证劵信息
        /// </summary>
        /// <param name="code">股票代码</param>
        /// <param name="marketType">市场类型</param>
        /// <returns>证劵信息</returns>
        Securities GetSingle(string code, MarketType marketType = MarketType.Unknown);

        /// <summary>
        /// 获取证劵信息集合
        /// </summary>
        /// <param name="market">市场类型</param>
        /// <returns>证劵信息集合</returns>
        IEnumerable<Securities> GetList(MarketType market = MarketType.Unknown);

        /// <summary>
        /// 获取指定条数的证劵信息集合
        /// </summary>
        /// <param name="code">上市公司股票代码</param>
        /// <param name="num">指定的记录数</param>
        /// <param name="marketType">市场类型</param>
        /// <param name="securitiesType">证券类型</param>
        /// <returns>证券信息集合</returns>
        IEnumerable<Securities> SearchList(string code, int num, MarketType marketType = MarketType.Unknown, SecuritiesType securitiesType = SecuritiesType.Unknown);
    }
}
